﻿using System;
using SharpSqlAnalyzer.pp.para;
using SharpSqlAnalyzer.pp.processor;
using SharpSqlAnalyzer.pp.stmtformatter.type;

namespace SharpSqlAnalyzer.pp.stmtformatter.builder
{
	// Token: 0x02000214 RID: 532
	public class AbstractStmtFormatterBuilder
	{
		// Token: 0x06001248 RID: 4680 RVA: 0x003188C8 File Offset: 0x00316AC8
		public virtual AbstractStmtFormatter build()
		{
			AbstractStmtFormatter abstractStmtFormatter = this.newInstanceFormatter();
			abstractStmtFormatter.SessionId = this.Option.sessionId;
			this.initCommonProcessorsForFormatter(abstractStmtFormatter);
			this.initSpecialProcessorForFormatter(abstractStmtFormatter);
			return abstractStmtFormatter;
		}

		// Token: 0x06001249 RID: 4681 RVA: 0x003188FC File Offset: 0x00316AFC
		protected internal virtual void initCommonProcessorsForFormatter(AbstractStmtFormatter formatter)
		{
			formatter.addExpressionProcessor(ProcessorFactory.createExpressionProcessor(this.Option));
		}

		// Token: 0x0600124A RID: 4682 RVA: 0x0031890F File Offset: 0x00316B0F
		protected internal virtual void initSpecialProcessorForFormatter(AbstractStmtFormatter formatter)
		{
		}

		// Token: 0x0600124B RID: 4683 RVA: 0x00318911 File Offset: 0x00316B11
		protected internal virtual AbstractStmtFormatter newInstanceFormatter()
		{
			return null;
		}

		// Token: 0x1700034B RID: 843
		// (get) Token: 0x0600124C RID: 4684 RVA: 0x00318914 File Offset: 0x00316B14
		// (set) Token: 0x0600124D RID: 4685 RVA: 0x0031891C File Offset: 0x00316B1C
		public virtual GFmtOpt Option
		{
			get
			{
				return this.option;
			}
			set
			{
				this.option = value;
			}
		}

		// Token: 0x040013F3 RID: 5107
		private GFmtOpt option;
	}
}
